#!/bin/bash
NAME=`echo ${1%%\.*} | sed -e "s/Immediate//g;s/Perfect//g;s/^[-_a-zA-Z0-9]\+\/[a-zA-Z]\{2\}\([a-zA-Z]\)[a-zA-Z]*_\([a-z]\?\)[a-z]*\([0-9]\+\)x\([0-9]\+\)x\?\([0-9]\+\)_\([a-zA-Z]\)[a-zA-Z]*_\([0-9]\+\)[0-9]\{2\}keV_\([0-9]\+\|i\)\(so\|deg\)/k\1\2\3\4\5\6\7_\8/g"`
echo Starting job $NAME
./kerneldens_torque_script "$@" | qsub -q $(whoami) -m abe -l nodes=1,mem=100mb,nice=10 -N $NAME
